import {PageEnum} from "@/enums/pageEnum";
import Layout from "@/layout/default/index.vue";

export const LAYOUT = () => Promise.resolve(Layout)
export const constantRoutes = [
    {
        path: '/:pathMatch(.*)*',
        component: () => import('@/views/error/404.vue')
    },
    {
        path: PageEnum.ERROR_403,
        component: () => import('@/views/error/403.vue')
    },
    {
        path: PageEnum.LOGIN,
        component: () => import('@/views/account/login.vue')
    },
    {
        path: '/account',
        component: () => import('@/layout/default/index.vue'),
        children: [
            {
                path: 'setting',
                component: () => import('@/views/account/setting.vue'),
                name: Symbol(),
                meta: {
                    title: '个人设置'
                }
            }
        ]
    }
]

export const INDEX_ROUTE = {
    path: PageEnum.INDEX,
    component: LAYOUT,
    name: Symbol()
}